import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { resolve } from "path"

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
  base: "./",
  resolve: {
    alias: {
      "@": resolve(__dirname, "./src"),
      "@assets": resolve(__dirname, "./src/assets"),
      "@components": resolve(__dirname, "./src/components"),
      "@router": resolve(__dirname, "./src/router"),
      "@page": resolve(__dirname, "./src/pages"),
      "@utils": resolve(__dirname, "./src/utils"),
      "@store": resolve(__dirname, "./src/model")
    }
  },
  server: {
    host: "0.0.0.0"
  },
  build: {
    assetsDir: "./static",
    outDir: resolve(__dirname, "./dist")
  },
  css: {
    modules: {
      localsConvention: "camelCase"
    }
  }
})
